package com.wanmait.deliverymangementsystem.service;

import com.github.pagehelper.PageInfo;
import com.wanmait.deliverymangementsystem.pojo.Orders;
import com.wanmait.deliverymangementsystem.pojo.Runner;

import java.util.List;

public interface OrdersService {
    public void create(Orders orders);
    public PageInfo<Orders> adminFindAll(Integer page);
    public List<Orders> runnerFindAll(Runner runner);
    PageInfo<Orders> userWaitOrderFind(Integer id,Integer pageNo);
    PageInfo<Orders> runnerFindWaitOrder(Integer pageNo,Integer cityID);
    Orders findOrder(Integer ID);
    void accept(Orders orders);

    PageInfo<Orders>userFindAll(Integer pageNo,Integer id);
    PageInfo<Orders>runnerFindOrdering(Integer page,Integer ID);

    Orders findBeforeDelivery(Integer id);

    void updateStatus(Integer id,Integer status);
    void cancelBeforeAccept(Integer id);
    Integer findRunnerTaskingNumber(Integer id);
    Integer findAllOrder();
    Integer findCompleteOrder();
    PageInfo<Orders> findUserCompleteOrderList(Integer id,Integer pageNo);
    PageInfo<Orders> findUserTaskingOrderList(Integer id,Integer pageNo);

    Orders findByTaskID(Integer id);

    void deleteUser(Integer id);

    void deleteAdmin(Integer id);

    void deleteRunner(Integer id);

    void deleteUserByTaskID(Integer id);

    void deleteAdminByTaskID(Integer id);

    void deleteRunnerByTaskID(Integer id);

    PageInfo<Orders> findCompletedByRunnerID(Integer id,Integer page);
}
